package cn.edu.scau.cmi.chenjia.composite.consistent;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import cn.edu.scau.cmi.chenjia.composite.safe.SafeOrganization;
import cn.edu.scau.cmi.chenjia.composite.safe.SafePerson;

public abstract class ConsistentOrganization {
	ConsistentOrganization parent=null;
	
	private String name;
	private String department;
	
	public ConsistentTeam st;
	public ConsistentPerson sp;
	
	
	public String getName() {
		return sp.getName();
	}

	public void setName(String name) {
		 sp.setName(name);;
	}
	
	public String getDepartment() {
		return st.getDepartment();
	}

	public void setDepartment(String department) {
		st.setDepartment(department);;
	}

	
	
	abstract String doSomething();
	
	abstract ConsistentOrganization getParent();

	//	(5)对构成部分管理的功能，这些和安全性组合模式不同
	abstract ConsistentOrganization addChild(ConsistentOrganization child);
	abstract ConsistentOrganization deleteChild(ConsistentOrganization child);
	abstract List<ConsistentOrganization> getChildren();
}
